package cn.pink.common.entity.game.item;

import cn.pink.common.constant.DBConst;
import cn.pink.core.entity.AbstractEntity;
import cn.pink.core.gen.entity.Entity;

/**
 * 道具数据
 * @Author: pink
 * @Date: 2022/7/19 11:53
 */
@Entity(tableKey = DBConst.DB_KEY_HUMAN_ITEM_MAP, key = DBConst.DB_MAP_KEY_ID)
public class EntityHumanItemData extends AbstractEntity {
    private final transient int mid;

    /** 道具sn */
    private int sn;

    /** 数量 */
    private int num;

    /** 获得时间 */
    private long grantTime;

    public EntityHumanItemData(String humanId, int mid) {
        this.mid = mid;
        init(humanId);
    }

    @Override
    public void makeKey() {
        keyPrefix = DBConst.DB_KEY_HUMAN_ITEM_MAP + "." + mid;
    }

    public int getSn() {
        return sn;
    }

    public void setSn(int sn) {
        this.sn = sn;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public long getGrantTime() {
        return grantTime;
    }

    public void setGrantTime(long grantTime) {
        this.grantTime = grantTime;
    }
}
